/*package com.example.demo;

import com.example.smart_home.R;

import android.app.Notification;
import android.app.Service;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;
//import object.p2pipcam.nativecaller.NativeCaller;

public class BridgeService extends Service
{
  private static AddCameraInterface addCameraInterface;
  private static AlarmInterface alarmInterface;
  private static DateTimeInterface dateTimeInterface;
  private static FtpInterface ftpInterface;
  private static IpcamClientInterface ipcamClientInterface;
  private static MailInterface mailInterface;
  private static PictureInterface pictureInterface;
  private static PlayBackInterface playBackInterface;
  private static PlayBackTFInterface playBackTFInterface;
  private static PlayInterface playInterface;
  private static SDCardInterface sCardInterface;
  private static UserInterface userInterface;
  private static VideoInterface videoInterface;
  private static WifiInterface wifiInterface;
  private String TAG = BridgeService.class.getSimpleName();
  private Notification mNotify2;
  private PlayActivity playActivity;

  private void AudioData(String paramString, byte[] paramArrayOfByte, int paramInt)
  {
    Log.d(this.TAG, "AudioData: len :+ " + paramInt);
    if (playInterface != null)
      playInterface.callBackAudioData(paramArrayOfByte, paramInt);
  }

  private void CallBack_H264Data(String paramString, byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    if (playInterface != null)
      playInterface.callBackH264Data(paramArrayOfByte, paramInt1, paramInt2);
  }

  private void CallBack_PlaybackVideoData(String paramString, byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    Log.d(this.TAG, "CallBack_PlaybackVideoData  len:" + paramInt2 + " width:" + paramInt3 + " height:" + paramInt4);
    if (playBackInterface != null)
      playBackInterface.callBackPlaybackVideoData(paramArrayOfByte, paramInt1, paramInt2, paramInt3, paramInt4);
  }

  private void CallBack_RecordFileSearchResult(String paramString1, String paramString2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
  {
    Log.d(this.TAG, "CallBack_RecordFileSearchResult did: " + paramString1 + " filename: " + paramString2 + " size: " + paramInt1);
    if (playBackTFInterface != null)
      playBackTFInterface.callBackRecordFileSearchResult(paramString1, paramString2, paramInt1, paramInt6);
  }

  private void MessageNotify(String paramString, int paramInt1, int paramInt2)
  {
    if (playInterface != null)
      playInterface.callBackMessageNotify(paramString, paramInt1, paramInt2);
  }

  private void PPPPMsgNotify(String paramString, int paramInt1, int paramInt2)
  {
    Log.d(this.TAG, "PPPPMsgNotify  did:" + paramString + " type:" + paramInt1 + " param:" + paramInt2);
    if (ipcamClientInterface != null)
      ipcamClientInterface.BSMsgNotifyData(paramString, paramInt1, paramInt2);
    if (wifiInterface != null)
      wifiInterface.callBackPPPPMsgNotifyData(paramString, paramInt1, paramInt2);
    if (userInterface != null)
      userInterface.callBackPPPPMsgNotifyData(paramString, paramInt1, paramInt2);
  }

  private void PPPPSnapshotNotify(String paramString, byte[] paramArrayOfByte, int paramInt)
  {
    Log.d(this.TAG, "did:" + paramString + " len:" + paramInt);
    if (ipcamClientInterface != null)
      ipcamClientInterface.BSSnapshotNotify(paramString, paramArrayOfByte, paramInt);
  }

  private void VideoData(String paramString, byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    if (playInterface != null)
      playInterface.callBaceVideoData(paramString, paramArrayOfByte, paramInt1, paramInt2, paramInt3, paramInt4);
  }

  private Notification getNotification(String paramString1, String paramString2, boolean paramBoolean)
  {
    return this.mNotify2;
  }

  public static void setAddCameraInterface(AddCameraInterface paramAddCameraInterface)
  {
    addCameraInterface = paramAddCameraInterface;
  }

  public static void setAlarmInterface(AlarmInterface paramAlarmInterface)
  {
    alarmInterface = paramAlarmInterface;
  }

  public static void setDateTimeInterface(DateTimeInterface paramDateTimeInterface)
  {
    dateTimeInterface = paramDateTimeInterface;
  }

  public static void setFtpInterface(FtpInterface paramFtpInterface)
  {
    ftpInterface = paramFtpInterface;
  }

  public static void setIpcamClientInterface(IpcamClientInterface paramIpcamClientInterface)
  {
    ipcamClientInterface = paramIpcamClientInterface;
  }

  public static void setMailInterface(MailInterface paramMailInterface)
  {
    mailInterface = paramMailInterface;
  }

  public static void setPictureInterface(PictureInterface paramPictureInterface)
  {
    pictureInterface = paramPictureInterface;
  }

  public static void setPlayBackInterface(PlayBackInterface paramPlayBackInterface)
  {
    playBackInterface = paramPlayBackInterface;
  }

  public static void setPlayBackTFInterface(PlayBackTFInterface paramPlayBackTFInterface)
  {
    playBackTFInterface = paramPlayBackTFInterface;
  }

  public static void setPlayInterface(PlayInterface paramPlayInterface)
  {
    playInterface = paramPlayInterface;
  }

  public static void setSDCardInterface(SDCardInterface paramSDCardInterface)
  {
    sCardInterface = paramSDCardInterface;
  }

  public static void setUserInterface(UserInterface paramUserInterface)
  {
    userInterface = paramUserInterface;
  }

  public static void setVideoInterface(VideoInterface paramVideoInterface)
  {
    videoInterface = paramVideoInterface;
  }

  public static void setWifiInterface(WifiInterface paramWifiInterface)
  {
    wifiInterface = paramWifiInterface;
  }

  public void CallBack_AlarmNotify(String paramString, int paramInt)
  {
    Log.d("tag", "callBack_AlarmNotify did:" + paramString + " alarmtype:" + paramInt);
    switch (paramInt)
    {
    default:
      return;
    case 1:
      getNotification(getResources().getString(R.string.alerm_motion_alarm), paramString, true);
      return;
    case 2:
    }
    getNotification(getResources().getString(R.string.alerm_gpio_alarm), paramString, true);
  }

  public void CallBack_AlarmParams(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12, int paramInt13, int paramInt14, int paramInt15, int paramInt16, int paramInt17, int paramInt18, int paramInt19, int paramInt20, int paramInt21, int paramInt22, int paramInt23, int paramInt24, int paramInt25, int paramInt26, int paramInt27, int paramInt28, int paramInt29, int paramInt30, int paramInt31, int paramInt32, int paramInt33)
  {
    if (alarmInterface != null)
      alarmInterface.callBackAlarmParams(paramString, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8, paramInt9, paramInt10, paramInt11, paramInt12, paramInt13, paramInt14, paramInt15, paramInt16, paramInt17, paramInt18, paramInt19, paramInt20, paramInt21, paramInt22, paramInt23, paramInt24, paramInt25, paramInt26, paramInt27, paramInt28, paramInt29, paramInt30, paramInt31, paramInt32, paramInt33);
  }

  public void CallBack_CameraParams(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
  {
    Log.d("ddd", "CallBack_CameraParams");
    if (playInterface != null)
      playInterface.callBackCameraParamNotify(paramString, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6);
  }

  public void CallBack_CameraStatusParams(String paramString1, String paramString2, String paramString3, String paramString4, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    Log.d("ddd", "CallBack_CameraStatusParams");
    if (ipcamClientInterface != null)
      ipcamClientInterface.CameraStatus(paramString1, paramInt1);
  }

  public void CallBack_DDNSParams(String paramString1, int paramInt1, String paramString2, String paramString3, String paramString4, String paramString5, int paramInt2, int paramInt3)
  {
    Log.d("ddd", "CallBack_DDNSParams");
  }

  public void CallBack_DatetimeParams(String paramString1, int paramInt1, int paramInt2, int paramInt3, String paramString2)
  {
    if (dateTimeInterface != null)
      dateTimeInterface.callBackDatetimeParams(paramString1, paramInt1, paramInt2, paramInt3, paramString2);
  }

  public void CallBack_FtpParams(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, int paramInt1, int paramInt2, int paramInt3)
  {
    if (ftpInterface != null)
      ftpInterface.callBackFtpParams(paramString1, paramString2, paramString3, paramString4, paramString5, paramInt1, paramInt2, paramInt3);
  }

  public void CallBack_MailParams(String paramString1, String paramString2, int paramInt1, String paramString3, String paramString4, int paramInt2, String paramString5, String paramString6, String paramString7, String paramString8, String paramString9)
  {
    if (mailInterface != null)
      mailInterface.callBackMailParams(paramString1, paramString2, paramInt1, paramString3, paramString4, paramInt2, paramString5, paramString6, paramString7, paramString8, paramString9);
  }

  public void CallBack_NetworkParams(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6, int paramInt1, int paramInt2, int paramInt3)
  {
    Log.d("ddd", "CallBack_NetworkParams");
  }

  public void CallBack_PTZParams(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9)
  {
    Log.d("ddd", "CallBack_PTZParams");
  }

  public void CallBack_RecordSchParams(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12, int paramInt13, int paramInt14, int paramInt15, int paramInt16, int paramInt17, int paramInt18, int paramInt19, int paramInt20, int paramInt21, int paramInt22, int paramInt23, int paramInt24, int paramInt25, int paramInt26, int paramInt27, int paramInt28)
  {
    if (sCardInterface != null)
      sCardInterface.callBackRecordSchParams(paramString, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramInt8, paramInt9, paramInt10, paramInt11, paramInt12, paramInt13, paramInt14, paramInt15, paramInt16, paramInt17, paramInt18, paramInt19, paramInt20, paramInt21, paramInt22, paramInt23, paramInt24, paramInt25, paramInt26, paramInt27, paramInt28);
  }

  public void CallBack_SetSystemParamsResult(String paramString, int paramInt1, int paramInt2)
  {
    switch (paramInt1)
    {
    default:
    case 11:
    case 10:
    case 18:
    case 16:
    case 17:
    case 12:
    case 28:
    }
    do
    {
      do
      {
        do
        {
          do
          {
            do
            {
              do
              {
                do
                {
                  return;
                }
                while (wifiInterface == null);
                wifiInterface.callBackSetSystemParamsResult(paramString, paramInt1, paramInt2);
                return;
              }
              while (userInterface == null);
              userInterface.callBackSetSystemParamsResult(paramString, paramInt1, paramInt2);
              return;
            }
            while (alarmInterface == null);
            alarmInterface.callBackSetSystemParamsResult(paramString, paramInt1, paramInt2);
            return;
          }
          while (mailInterface == null);
          mailInterface.callBackSetSystemParamsResult(paramString, paramInt1, paramInt2);
          return;
        }
        while (ftpInterface == null);
        ftpInterface.callBackSetSystemParamsResult(paramString, paramInt1, paramInt2);
        return;
      }
      while (dateTimeInterface == null);
      Log.d(this.TAG, "user result:" + paramInt2 + " paramType:" + paramInt1);
      dateTimeInterface.callBackSetSystemParamsResult(paramString, paramInt1, paramInt2);
      return;
    }
    while (sCardInterface == null);
    sCardInterface.callBackSetSystemParamsResult(paramString, paramInt1, paramInt2);
  }

  public void CallBack_Snapshot(String paramString, byte[] paramArrayOfByte, int paramInt)
  {
    Log.d("ddd", "CallBack_Snapshot");
    if (ipcamClientInterface != null)
      ipcamClientInterface.BSSnapshotNotify(paramString, paramArrayOfByte, paramInt);
  }

  public void CallBack_UserParams(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6, String paramString7)
  {
    Log.d("ddd", "CallBack_UserParams");
    if (userInterface != null)
      userInterface.callBackUserParams(paramString1, paramString2, paramString3, paramString4, paramString5, paramString6, paramString7);
    if (ipcamClientInterface != null)
      ipcamClientInterface.callBackUserParams(paramString1, paramString2, paramString3, paramString4, paramString5, paramString6, paramString7);
  }

  public void CallBack_WifiParams(String paramString1, int paramInt1, String paramString2, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, String paramString3, String paramString4, String paramString5, String paramString6, int paramInt8, int paramInt9, int paramInt10, int paramInt11, String paramString7)
  {
    Log.d("ddd", "CallBack_WifiParams");
    if (wifiInterface != null)
      wifiInterface.callBackWifiParams(paramString1, paramInt1, paramString2, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, paramInt7, paramString3, paramString4, paramString5, paramString6, paramInt8, paramInt9, paramInt10, paramInt11, paramString7);
  }

  public void CallBack_WifiScanResult(String paramString1, String paramString2, String paramString3, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
  {
    Log.d("tag", "CallBack_WifiScanResult");
    if (wifiInterface != null)
      wifiInterface.callBackWifiScanResult(paramString1, paramString2, paramString3, paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6);
  }

  public void SearchResult(int paramInt1, String paramString1, String paramString2, String paramString3, String paramString4, int paramInt2)
  {
    Log.d(this.TAG, "SearchResult: " + paramString4 + " " + paramInt2);
    if (paramString3.length() == 0);
    while (addCameraInterface == null)
      return;
    addCameraInterface.callBackSearchResultData(paramInt1, paramString1, paramString2, paramString3, paramString4, paramInt2);
  }

  public IBinder onBind(Intent paramIntent)
  {
    Log.d("tag", "BridgeService onBind()");
    return new ControllerBinder();
  }

  public void onCreate()
  {
    super.onCreate();
    Log.d("tag", "BridgeService onCreate()");
    //NativeCaller.PPPPSetCallbackContext(this);
  }

  public void onDestroy()
  {
    super.onDestroy();
  }

  public int onStartCommand(Intent paramIntent, int paramInt1, int paramInt2)
  {
    return super.onStartCommand(paramIntent, paramInt1, paramInt2);
  }

  public static abstract interface AddCameraInterface
  {
    public abstract void callBackSearchResultData(int paramInt1, String paramString1, String paramString2, String paramString3, String paramString4, int paramInt2);
  }

  public static abstract interface AlarmInterface
  {
    public abstract void callBackAlarmParams(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12, int paramInt13, int paramInt14, int paramInt15, int paramInt16, int paramInt17, int paramInt18, int paramInt19, int paramInt20, int paramInt21, int paramInt22, int paramInt23, int paramInt24, int paramInt25, int paramInt26, int paramInt27, int paramInt28, int paramInt29, int paramInt30, int paramInt31, int paramInt32, int paramInt33);

    public abstract void callBackSetSystemParamsResult(String paramString, int paramInt1, int paramInt2);
  }

  class ControllerBinder extends Binder
  {
    ControllerBinder()
    {
    }

    public BridgeService getBridgeService()
    {
      return BridgeService.this;
    }
  }

  public static abstract interface DateTimeInterface
  {
    public abstract void callBackDatetimeParams(String paramString1, int paramInt1, int paramInt2, int paramInt3, String paramString2);

    public abstract void callBackSetSystemParamsResult(String paramString, int paramInt1, int paramInt2);
  }

  public static abstract interface FtpInterface
  {
    public abstract void callBackFtpParams(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, int paramInt1, int paramInt2, int paramInt3);

    public abstract void callBackSetSystemParamsResult(String paramString, int paramInt1, int paramInt2);
  }

  public static abstract interface IpcamClientInterface
  {
    public abstract void BSMsgNotifyData(String paramString, int paramInt1, int paramInt2);

    public abstract void BSSnapshotNotify(String paramString, byte[] paramArrayOfByte, int paramInt);

    public abstract void CameraStatus(String paramString, int paramInt);

    public abstract void callBackUserParams(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6, String paramString7);
  }

  public static abstract interface MailInterface
  {
    public abstract void callBackMailParams(String paramString1, String paramString2, int paramInt1, String paramString3, String paramString4, int paramInt2, String paramString5, String paramString6, String paramString7, String paramString8, String paramString9);

    public abstract void callBackSetSystemParamsResult(String paramString, int paramInt1, int paramInt2);
  }

  public static abstract interface PictureInterface
  {
    public abstract void BSMsgNotifyData(String paramString, int paramInt1, int paramInt2);
  }

  public static abstract interface PlayBackInterface
  {
    public abstract void callBackPlaybackVideoData(byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3, int paramInt4);
  }

  public static abstract interface PlayBackTFInterface
  {
    public abstract void callBackRecordFileSearchResult(String paramString1, String paramString2, int paramInt1, int paramInt2);
  }

  public static abstract interface PlayInterface
  {
    public abstract void callBaceVideoData(String paramString, byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3, int paramInt4);

    public abstract void callBackAudioData(byte[] paramArrayOfByte, int paramInt);

    public abstract void callBackCameraParamNotify(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6);

    public abstract void callBackH264Data(byte[] paramArrayOfByte, int paramInt1, int paramInt2);

    public abstract void callBackMessageNotify(String paramString, int paramInt1, int paramInt2);
  }

  public static abstract interface SDCardInterface
  {
    public abstract void callBackRecordSchParams(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12, int paramInt13, int paramInt14, int paramInt15, int paramInt16, int paramInt17, int paramInt18, int paramInt19, int paramInt20, int paramInt21, int paramInt22, int paramInt23, int paramInt24, int paramInt25, int paramInt26, int paramInt27, int paramInt28);

    public abstract void callBackSetSystemParamsResult(String paramString, int paramInt1, int paramInt2);
  }

  public static abstract interface UserInterface
  {
    public abstract void callBackPPPPMsgNotifyData(String paramString, int paramInt1, int paramInt2);

    public abstract void callBackSetSystemParamsResult(String paramString, int paramInt1, int paramInt2);

    public abstract void callBackUserParams(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6, String paramString7);
  }

  public static abstract interface VideoInterface
  {
    public abstract void BSMsgNotifyData(String paramString, int paramInt1, int paramInt2);
  }

  public static abstract interface WifiInterface
  {
    public abstract void callBackPPPPMsgNotifyData(String paramString, int paramInt1, int paramInt2);

    public abstract void callBackSetSystemParamsResult(String paramString, int paramInt1, int paramInt2);

    public abstract void callBackWifiParams(String paramString1, int paramInt1, String paramString2, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, String paramString3, String paramString4, String paramString5, String paramString6, int paramInt8, int paramInt9, int paramInt10, int paramInt11, String paramString7);

    public abstract void callBackWifiScanResult(String paramString1, String paramString2, String paramString3, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6);
  }
}
*/